<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		.father{
			width: 500px;
			height: 500px;
			background:red;
		}
		.son{
			width: 100px;
			height: 100px;
			background: green;
			
			/*设置盒子左外边距为auto，将盒子冲到右边*/
			margin-left:auto;

		}
	</style>
</head>
<body>
	<div class="father">
		<div class="son"></div>
	</div>

</body>
</html>